package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class OriginalMethodSpecification implements MethodSpecification {

    private int beginIndex;
    private int endIndex;
    private PartialMethodSpecification partialMethodSpecification;
    private boolean selfAsResult;
    private boolean selfAsLocator;
    private MethodCharacteristics methodCharacteristics;

    public OriginalMethodSpecification(int endIndex,
                                       PartialMethodSpecification partialMethodSpecification,
                                       boolean selfAsResult,
                                       boolean selfAsLocator,
                                       MethodCharacteristics methodCharacteristics) {
        this.beginIndex = partialMethodSpecification.getBeginIndex();
        this.endIndex = endIndex;
        this.partialMethodSpecification = partialMethodSpecification;
        this.selfAsResult = selfAsResult;
        this.selfAsLocator = selfAsLocator;
        this.methodCharacteristics = methodCharacteristics;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public PartialMethodSpecification getPartialMethodSpecification() {
        return partialMethodSpecification;
    }

    public boolean isSelfAsResult() {
        return selfAsResult;
    }

    public boolean isSelfAsLocator() {
        return selfAsLocator;
    }

    public MethodCharacteristics getMethodCharacteristics() {
        return methodCharacteristics;
    }

}
